<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>新增页面</title>
 <meta name="viewport" content="width=device-width, initial-scale=1.0">
 <link rel="stylesheet" href="static/plugins/datatable/bootstrap.min.css">
 <link rel="stylesheet" href="static/plugins/datatable/bootstrap-table.min.css">
  <link rel="stylesheet" href="static/plugins/datatable/bootstrap-table.min.css">

</head>
<body>
<div class="container">
		<form class="form-horizontal" id="import-form" method="post" enctype="multipart/form-data">
			<div class="form-group">
				<label class="col-sm-2 control-label text-right">文件上传</label>
				<div class="col-sm-4">
					<input type="file" id="file" name="mesfile" class="form-control"  />
				</div>
				<div class="col-sm-6"><p class="help-block" id="gene_name_info_area"></p></div>
			</div>
			
		
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					<button type="button" class="save-btn btn btn-primary">
						<i class="fa fa-save"></i> 提交
					</button>
				</div>
			</div>
		</form>
</div>
<script src="/messagework/static/js/common/jquery-1.8.0.min.js"></script>
<script src="static/plugins/datatable/bootstrap.min.js"></script>
<script type="text/javascript" src="static/js/common/jquery.form.js"></script>
<script>

$(function(){
	$(".save-btn").on("click",function(){
		$('#import-form').ajaxSubmit({
			type:'post',
			url:'/messagework/importmes',
			success:function(data){
				if(data.ok)
				{
				parent.layer.msg(data.msg,{icon: 1,time:2000,shade: [0.8, '#393D49']}, function(){
					parent.$table.bootstrapTable('refresh');
					parent.layer.close(parent.layer.getFrameIndex(window.name)); //关闭弹窗
				});
				}else{
					parent.layer.msg(data.msg,{time:1500,shade: [0.8, '#393D49']});
				}
			}
			
		});
	});
});
</script>
</body>
</html>